1. Field
The following description relates to processing technology and, more particularly, to a method and memory manager for managing a memory in a multi-processing environment.
2. Description of the Related Art
In a multi-processing environment where a multi-core or multiprocessor exists, processes or threads assigned to the respective cores or processors share memory, such as queues, and process jobs stored in the queues.
In such a multi-processing environment, multiple processes may be used to perform a certain task. Examples of the processes include a producer process which produces data while performing a task, and a consumer process which consumes data while performing a task. For example, in a case of a video decoder which is implemented with a multiprocessor, variable length decoding corresponds to a producer process and macroblock processing corresponds to a consumer process.
In an environment where both the producer process and the consumer process are performed at the same time, to improve the overall work performance, a memory bandwidth shared by the producer process and the consumer process should be efficiently used.
In a traditional multi-processing environment, the number of processors assigned to consumer processes is increased to increase the parallel processing degree and thus to improve the work performance. However, in this set up, the increased number of processors assigned to the consumer processes can use up the memory bandwidth, and other processors may not have the chance to access the memory, thereby decreasing the overall work performance. The number of processors assigned to processes may be predetermined or limited to a predetermined number. In this case, the overall work performance may decrease since a predetermined number of processors are used without taking work conditions into account. Further, other traditional methods have been known to require alteration to memory bus architecture.